<template>
  <div class="layout-container flex flex-v">
    <!--头部信息-->
    <div class="header-box">
      <form action="/">
        <van-search
          placeholder="请输入搜索关键词"
          show-action
        />
      </form>
    </div>
    <!--中间区域-->
    <div class="body-box">
      <!--轮播图-->
      <div class="swiper-box">
        <van-swipe :autoplay="3000" indicator-color="white">
          <van-swipe-item>1</van-swipe-item>
          <van-swipe-item>2</van-swipe-item>
          <van-swipe-item>3</van-swipe-item>
          <van-swipe-item>4</van-swipe-item>
        </van-swipe>
      </div>

      <!--标题-->
      <div class="item-title-box">
        <span class="item-icon tm"></span>
        <p class="item-title">新年灯笼儿童手提发光花灯手工制作diy材料元宵节小灯笼led电灯</p>
      </div>

      <!--券码信息-->
      <div class="item-vouchers-box">
        <div class="vouchers-info flex flex-align-center flex-pack-justify">
          <p class="info-duanluo">券后价
            <span class="info-active">￥9.8</span>
            <span class="info-after">￥19.8</span>
            <span class="info-total">3531人已购</span>
          </p>
          <p class="info-num-box">
            <span class="nums">10元</span>
            <span class="price">券</span>
          </p>
        </div>
        <p class="vouchers-detail">下单预计获得 ¥<span class="vouchers-replay">1.182</span>元</p>
      </div>

      <!--复制口令-->
      <div class="item-pwd">
        <p class="pwd-title">一键复制上方口令，打开手机淘宝购买</p>
      </div>
    </div>

    <!--底部菜单-->
    <div class="footer-box flex">
      <div class="left-btn flex">
        <a href="javascript:void(0);" class="btn-link flex flex-v flex-align-center flex-pack-center flex-1">
          <span class="link-icon">
            <img src="https://img.li5.me/member/1/file/201803261855599503237.png" alt=""/>
          </span>
          <span class="link-title">返回</span>
        </a>
        <a href="javascript:void(0);" class="btn-link flex flex-v flex-align-center flex-pack-center flex-1">
          <span class="link-icon">
            <img src="https://img.li5.me/member/1/file/201803261854427943237.png" alt=""/>
          </span>
          <span class="link-title">客服</span>
        </a>
      </div>
      <div class="right-btn flex-1 flex">
        <a href="javascript:void(0);" class="btn-going copy-link">复制文案</a>
        <a href="javascript:void(0);" class="btn-going going-down">立刻领券</a>
      </div>
    </div>
  </div>
</template>

<script>
import {Search, Swipe, SwipeItem} from 'vant'

export default {
  name: 'test2',
  data () {
    return {
      title: '标题二',
      active: 0
    }
  },
  components: {
    [Search.name]: Search,
    [Swipe.name]: Swipe,
    [SwipeItem.name]: SwipeItem
  }
}
</script>

<style scoped lang="less">
  // 最外层
  .layout-container {
    width: 100%;
    min-height: 100vh;
    position: relative;

    .header-box {
      width: 100%;
      height: 54px;
    }

    .body-box {
      width: 100%;
      height: auto;
      overflow-y: scroll;
      position: absolute;
      top: 54px;
      bottom: 45px;

      .swiper-box {
        width: 100%;
        height: 338px;
      }

      .item-title-box {
        padding: 15px;

        .item-icon {
          margin-top: 3px;
        }
      }

      .item-vouchers-box {
        padding: 0px 15px 15px 15px;

        .vouchers-info {

          p {
            padding: 0;
            margin: 0;
          }

          .info-duanluo {
            color: #696969;
            font-size: 12px;
            font-weight: 400;
            font-style: normal;

            .info-active {
              color: #FE814B;
              font-size: 20px;
            }

            .info-after {
              color: #C7C4C4;
              font-size: 12px;
              text-decoration: line-through;
            }

            .info-total {
              margin-left: 15px;
            }
          }

          .info-num-box {
            width: 49px;
            height: 16px;
            font-size: 0;
            background: linear-gradient(180deg, #FE814B, #EDB361);
            border: 1px solid #FE814B;

            .nums {
              display: inline-block;
              font-size: 12px;
              color: #FE814B;
              background: #fff;
              width: 32px;
              text-align: center;
            }

            .price {
              display: inline-block;
              font-size: 12px;
              color: #fff;
              text-align: center;
              margin-left: 3px;
            }
          }
        }

        .vouchers-detail {
          padding: 0;
          margin: 0;
          color: #696969;
          font-size: 14px;
          font-weight: 400;
          font-style: normal;
          font-variant: normal;

          .vouchers-replay {
            color: #FE814B;
            font-size: 16px;
          }
        }
      }

      .item-pwd {
        .pwd-title {
          margin: 0;
          padding: 0;
          width: 100%;
          text-align: center;
          color: #999;
          font-size: 12px;
          line-height: 32px;
        }
      }

    }

    .footer-box {
      width: 100%;
      height: 47px;
      position: absolute;
      bottom: 0;

      .left-btn {
        width: 112px;

        .link-icon {
          height: 26px;
          width: 26px;
          display: inline-block;

          img {
            width: 100%;
            height: 100%;
          }
        }

        .link-title {
          margin-top: 3px;
          font-size: 12px;
        }
      }

      .right-btn {
        .btn-going {
          color: #fff;
          font-size: 12px;
          width: 131px;
          height: 47px;
          text-align: center;
          line-height: 47px;
          display: inline-block;
        }

        .copy-link {
          background: linear-gradient(90deg, #ffa957, #ffa800);
        }

        .going-down {
          background: linear-gradient(90deg, #ff00d0, #ff1c00);
        }
      }
    }
  }

  .item-icon {
    box-sizing: border-box;
    display: inline-block;
    height: 14px;
    width: 14px;
    float: left;
    margin-right: 4px;
    background-size: auto 14px;
    background-image: url(https://s2.li5.me/static/mobile/img/gicon.png);

    &.tm {
      background-position: 0px 0px;
    }

    &.tb {
      background-position: -60px 0px;
    }

    &.jin {
      background-position: -15px 0px;
    }

    &.jd {
      background-position: -151px 0px;
    }

    &.pdd {
      background-position: -135px 0px;
    }
  }

  .item-title {
    padding: 0;
    margin: 0;
    line-height: 120%;
    color: #030303;
    font-size: 16px;
    font-weight: 400;
  }
</style>
